Machine vision methods for image segmentation using multiple images

ABSTRACT

Machine vision methods for segmenting an image include the steps of generating a first image of the background of an object, generating a second image of the object and background, and subtracting the second image from the first image. The methods are characterized in that the second image is generated such that subtraction of it from the first image emphasizes the object with respect to the background.

REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 08/621,137, filedMar. 21, 1996, now U.S. Pat. No. 6,259,827 entitled “MACHINE VISIONMETHODS FOR IMAGE SEGMENTATION USING MULTIPLE IMAGES.”

This application is related to copending, commonly assigned U.S. patentapplication Ser. No. 08/621,189, for MACHINE VISION METHODS FORINSPECTION OF LEADS ON SEMICONDUCTOR DIE PACKAGES, filed this same dayherewith, the teachings of which are incorporated herein by reference.

This application is related to copending, commonly assigned U.S. patentapplication Ser. No. 08/521,190, for MACHINE VISION METHODS FORINSPECTION OF SEMICONDUCTOR DIE SURFACES, filed this same day herewith,the teachings of which are incorporated herein by reference.

RESERVATION OF COPYRIGHT

The disclosure of this patent document contains material which issubject to copyright protection. The owner thereof has no objection tofacsimile reproduction by anyone of the patent document or of the patentdisclosure, as it appears in the United States Patent and TrademarkOffice patent file or records, but otherwise reserves all rights undercopyright law.

BACKGROUND OF THE INVENTION

The invention pertains to machine vision and, more particularly, tomethods for image segmentation and object identification and defectdetection.

In automated manufacturing, it is often important to determine thelocation, shape, size and/or angular orientation of an object beingprocessed or assembled. For example, in automated wire bonding ofintegrated circuits, the precise location of leads in the “lead frame”and pads on the semiconductor die must be determined before wire bondscan be soldered them.

Although the human eye can readily distinguish between objects in animage, this is not historically the case for computerized machine visionsystems. In the field of machine vision, the task of analyzing an imageto isolate and identify its features is referred to as imagesegmentation. In an image of a lead frame, image segmentation can beemployed to identify pixels in the image representing the leads, as wellas those representing all other features,, i.e., “background.” Byassigning values of “1” to the pixels representing leads, and byassigning values of “0” to the background pixels, image segmentationfacilitates analysis of the image by other machine vision tools, such as“connectivity” analysis.

The prior art suggests a number of techniques for segmenting an image.Thresholding, for example, involves identifying image intensities thatdistinguish an object (i.e., any feature of interest) from itsbackground (i.e., any feature not of interest). For example, in an imageof a lead frame, thresholding can be used to find an appropriate shadeof gray that distinguishes each pixel in the image as object (i.e.,lead) or background, thereby, completing segmentation. More complexthresholding techniques generate multiple threshold values thatadditionally permit the object to be identified.

Connectivity analysis is employed to isolate the features in athresholded image. This technique segregates individual features byidentifying their component pixels, particularly, those that areconnected to each other by virtue of horizontal, vertical or diagonaladjacency.

Though the segmentation techniques described above are useful inisolating features of simple objects, they are often of only limitedvalue in identifying objects with complex backgrounds. This typicallyarises in defect detection, that is, in segmenting images to identifydefects on visually complicated surfaces, such as the surface of asemiconductor die, a printed circuit board, and printed materials. Inthese instances, segmentation is used to isolate a defect (if any) onthese complex surfaces. If the surface has no defects, segmentationshould reveal no object and only background. Otherwise, it should revealthe defect in the image as clusters of 1's against a background 0's.

To aid in segmenting complicated images, the prior art developed goldentemplate comparison (GTC). This is a technique for locating defects bycomparing a feature under scrutiny (to wit, a semiconductor die surface)to a good image—or golden template—that is stored in memory. Thetechnique subtracts the good image from the test image and analyzes thedifference to determine if the expected object (e.g., a defect) ispresent. For example, upon subtracting the image of a goodpharmaceutical label from a defective one, the resulting “difference”image would reveal missing words and portions of characters.

Before GTC inspections can be performed, it must be “trained” so thatthe golden template can be stored in memory. To this end, the GTCtraining functions are employed to analyze several good samples of ascene to create a “mean” image and “standard deviation” image. The meanimage is a statistical average of all the samples analyzed by thetraining functions. It defines what a typical good scene looks like. Thestandard deviation image defines those areas on the object where thereis little variation from part to part, as well as those areas in whichthere is great variation from part to part. This latter image permitsGTC's runtime inspection functions to use less sensitivity in areas ofgreater expected variation, and more sensitivity in areas of lessexpected variation. In all cases, the edges present in the parts giverise a large standard deviation as a result of discrete pixelregistration requirements, thus decreasing sensitivity in those regions.

At runtime, a system employing GTC captures an image of a scene ofinterest. Where the position of that scene is different from thetraining position, the captured image is aligned, or registered, withthe mean image. The intensities of the captured image are alsonormalized with those of the mean image to ensure that variationsillumination do not adversely affect the comparison.

The GTC inspection functions then subtract the registered, normalized,captured image from the mean image to produce a difference image thatcontains all the variations between the two. That difference image isthen compared with a “threshold” image derived from the standarddeviation image. This determines which pixels of the difference imageare to be ignored and which should be analyzed as possible defects. Thelatter are subjected to morphology, to eliminate or accentuate pixeldata patterns and to eliminate noise. An object recognition technique,such as connectivity analysis, can then be employed to classify theapparent defects.

Although GTC inspection tools have proven quite successful, they suffersome limitations. For example, except in unusual circumstances, GTCrequires registration—i.e., that the image under inspection beregistered with the template image. GTC also uses a standard deviationimage for thresholding, which can result in a loss of resolution nearedges due to high resulting threshold values. GTC is, additionally,limited to applications where the images are repeatable: it cannot beused where image-to-image variation results form changes in size, shape,orientation and warping.

An object of this invention, therefore, is to provide improved methodsfor machine vision and, more particularly, improved methods for imagesegmentation.

A further object is to provide such methods that can be used for defectidentification.

Yet another object is to provide such methods that can be used insegmenting and inspecting repeatable, as well as non-repeatable, images.

Yet still another object is to provide such methods that do notroutinely necessitate alignment or registration of an image underinspection with a template image.

Still yet a further object of the invention is to provide such methodsthat do not require training.

Still other objects of the invention include providing such machinevision methods as can be readily implemented on existing machine visionprocessing equipment, and which can be implemented for rapid executionwithout excessive consumption of computational power.

SUMMARY OF THE INVENTION

The foregoing objects are among those achieved by the invention whichprovides, in one aspect, a machine vision method for segmenting animage. The method includes the steps of generating a first image of atleast the “background” or an object, generating a second image of theobject and background, and subtracting the second image from the firstimage. The method is characterized in that the second image is generatedsuch that subtraction of it from the first image emphasizes the objectwith respect to the background. As used here and throughout, unlessotherwise evident from context, the term “object” refers to features ofinterest in an image (e.g., a defect), while the term “background”refers to features in an image that are not of interest (e.g., surfacefeatures on the semiconductor die on which the defect appears).

In related aspects of the invention, the second step is characterized asgenerating the second image such that its subtraction from the firstimage increases a contrast between the object and the background. Thatstep is characterized, in still further aspects of the invention, asbeing one that results in object-to-background contrast differences inthe second image that are of opposite polarity from theobject-to-background contrast differences in the first image.

In further aspects, the invention calls for generating a third imagewith the results of the subtraction, and for isolating the object onthat third image. Isolation can be performed, according to other aspectsof the invention, by connectivity analysis, edge detection and/ortracking, and by thresholding. In the latter regard, a thresholdimage—as opposed to one or two threshold values—can be generated bymapping image intensity values of the first or second image. Thatthreshold image can, then, be subtracted from the third image (i.e, thedifference image) to isolate further the object.

Still further objects of the invention provide for normalizing the firstand second images before subtracting them to generate the third image.In this aspect, the invention determines distributions of intensityvalues of each of the first and second images, applying mappingfunctions to one or both of them in order to match the tails of thosedistributions. The first and second images can also be registered priorto subtraction.

According to further aspects of the invention, the first and secondimages are generated by illuminating the object and/or its backgroundwith different respective light or emission sources. This includes, forexample, illuminating the object from the front in order to generate thefirst image, and illuminating it from behind in order to generate thesecond image. This includes, by way of further example, illuminating theobject and its background with direct, on-axis lighting to generate thefirst image, and illuminating it with diffuse, off-access or grazinglight to generate the second image. This includes, by way of stillfurther example, illuminating the object with different wavelengths oflight (e.g., red and blue) for each of the respective images, or incapturing reflections of different orientations (e.g., polarized andunpolarized) reflected from the object.

Additional aspects of the invention provide methods incorporatingvarious combinations of the foregoing aspects.

These and other aspects of the invention are evident in the drawings andin the descriptions that follow.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the invention may be attained by reference tothe drawings in which:

FIG. 1 depicts a machine vision system for practice of the invention;

FIGS. 2A-2C depict illumination arrangements for generating imagesanalyzed in accord with the invention;

FIGS. 3A-3F depict sample images (and their difference images) generatedby the lighting arrangements shown in FIGS. 2A-2B; and

FIG. 4 depicts a methodology for machine image segmentation according tothe invention.

DETAILED DESCRIPTION OF THE ILLUSTRATED EMBODIMENT

FIG. 1 illustrates a system 5 for determining machine vision imagesegmentation according to the invention. The system 5 includes acapturing device 10, such as a conventional video camera (such as theSony XC75 camera with COSMICAR lens) or scanner, that generates an imageof a scene including an object 1. Image data (or pixels) generated bythe capturing device 10 represent, in the conventional manner, the imageintensity (e.g., color or brightness) of each point in the scene at theresolution of the capturing device. The illustrated object isilluminated by on-axis light 7 and ring light 8 for generation ofmultiple images for segmentation in accord with methods discussedherein.

The digital image data is transmitted from capturing device 10 via acommunications path 11 to an image analysis system 12. This can be aconventional digital data processor, or a vision processing system (suchas the Cognex 5400) of the type commercially available from the assigneehereof, Cognex Corporation, programmed in accord with the teachingshereof to perform image segmentation. The image analysis system 12 mayhave one or more central processing units 13, main memory 14,input-output system 15, and disc drive (or other mass storage device)16, all of the conventional type.

The system 12 and, more particularly, central processing unit 13, isconfigured by programming instructions according to the teachings hereoffor image segmentation, as described in further detail below. Thoseskilled in the art will appreciate that, in addition to implementationon a programmable digital data processor, the methods and apparatustaught herein can be implemented in special purpose hardware.

FIG. 2A illustrates an arrangement of emission sources according to theinvention for on-axis and diffuse (or grazing) light illumination of acircuit element 20, e.g., a semiconductor die. The arrangement includeslighting sources 22 and 24 for illuminating the surface of element 20.Lighting source 22 provides direct, on-axis lighting, via reflection offa half-silvered, partially transparent, angled, one-way mirror 28.Lighting source 24 provides diffuse, off-access lighting, or grazinglight, for illuminating the object. Images of the illuminated element 20are captured by camera 26.

Lighting source 22 is of the conventional type known in the art foron-axis illumination of objects under inspection in a machine visionapplication. A preferred such light is a diffused on-axis light (DOAL)commercially available from Dolan Jenner. The source 22 is positioned tocause objects (i.e., potential defects) on the surface of element 20 toappear as dark features against a light background.

Lighting source 24 is also of a conventional type known in the art foruse in providing diffuse, off-axis light or grazing light in machinevision applications. One preferred source 24 is an arrangement ofseveral point light sources, e.g., fiber optic bundles, or line lights,disposed about element 20. Another preferred such lighting source 24 isa ring light and, still more preferably, a ring light of the typedisclosed in commonly assigned U.S. Pat. No. 5,367,439. The lightingsource 24 is positioned to illuminate the surface of element 20 in sucha way to cause objects (i.e., potential defects) thereon to appear aslight features against a dark background.

Other lighting sources known in the art can be used in place of on-axissource 22 and ring light source 24 to illuminate a surface underinspection. Considerations for selection and positioning of the sources22, 24 are that objects thereon, e.g., expected defects, appeardifferently (if at all) with respect to the background when illuminatedby each respective source 22, 24.

More particularly, the lighting sources 22, 24 are selected andpositioned in such that the subtraction of an image captured by camera26 when the surface is illuminated by one of the sources (e.g., 22) froman image captured by camera 26 when the surface is illuminated by theother source (e.g., 24) emphasizes objects on that surface—e.g., byincreasing the contrast between the object and the background (i.e., theremainder of the surface).

Put another way, the lighting sources 22, 24 are selected and positionedin such a way that an image generated by camera 26 when the surface isilluminated one source has an object-to-background contrast of anopposite polarity then the object-to-background contrast of an imagegenerated by camera 26 when the surface is illuminated the other source.

Thus, for example, in a preferred arrangement to detect defects on thesurface of a semiconductor die or leads of its package (or leadframe)—and, particularly, unwanted adhesive patches on those dies orleads—the on-axis lighting source 22 is selected and positioned (inconjunction with mirror 28) to cause the defect to be dark on a lightbackground (e.g., “positive” object-to-background contrast polarity),while the diffuse ring light 24 is selected and positioned to make thesame defect appear light on a dark background (e.g., “negative”object-to-background contrast polarity).

FIG. 3A similarly depicts an image generated by camera 26 when adefective semiconductor die (e.g., a die with adhesive on its surface)is illuminated by ring light or grazing light source 24. As shown in theillustration, the ring/grazing light reveals the adhesive as lightpatches 60, 62 on a dark background.

FIG. 3B depicts an image of the type generated by camera 26 when thatsame semiconductor die 20 is illuminated by on-axis lighting source 22.As shown in the drawing, the on-axis lighting reveals adhesive patches60, 62, on the die surface as dark patches on a light background.

FIG. 3C reveals a result according to the invention of subtracting theimages generated by camera 26 under these two separate lightingconditions. Put another way, FIG. 3C represents the result ofsubtracting the image of FIG. 3B from the image of FIG. 3A. In FIG. 3C,the defects on the semiconductor die surface 20 are revealed as verylight patches against a very dark background, as indicated by dashedlines. (Note that this figure shows the output of the subtraction afterremapping step 114, described below.)

As a consequence of the manner in which the defective semiconductor die20 is illuminated by the illustrated embodiment for purposes ofgenerating the images of FIGS. 3A and 3B, the difference image of FIG.3C emphasizes the contrast between the defects 60, 62 and the background(i.e., die 20).

FIG. 4 illustrates a method for image segmentation according to theinvention. That method is described below with respect to an embodimentthat uses on-axis/grazing illumination and that segments semiconductordie images to identify adhesive patches (i.e., defects) on the diesurfaces (as shown, by way of example, in FIGS. 3A-3C). This samemethodology can employed to detect adhesive patches on the leads of thedie package (or lead frame), as well as in a host of other applications.

In step 100, the method acquires an image of the semiconductor die withlighting source 24 or other grazing light. Likewise, in step 102, themethod acquires an image of the semiconductor die with on-axis lightsource 22. Though these images can be acquired at any times—though notconcurrently—they are typically acquired at about the same time. Thisreduces the risk that the object will be moved between acquisitions and,thereby, removes the need to register the images.

In the discussion that follows, the image acquired in step 100 isreferred to as “Image 1,” while the image acquired in step 102 isreferred to as “Image 2.” Although the discussion herein is directedtoward subtraction of Image 2 from Image 1, those skilled in the artwill likewise appreciate that Image 1 can be subtracted from Image 2.Preferably, Image 2 is subtracted from Image 1 in instances where theobject is lighter the background in Image 1, and where object is darkerthan the background in Image 2. Conversely, Image 1 is preferablysubtracted from Image 2 in instances where the object is lighter thebackground in Image 2, and where object is darker than the background inImage 1.

In optional step 104, the method registers the images to insurealignment of the features therein. Though not necessary in manyinstances, this step is utilized if the semiconductor die or camera ismoved between image acquisitions. Image registration can be performed,for example, by a two-dimensional cross-correlation of images, in themanner disclosed in Jain, Fundamentals of Digital Image Processing.(Prentice Hall 1989) at Chapter 2, the teachings of which areincoporated herein by reference.

In steps 104 and 106, the method windows Images 1 and 2. These steps,which are optional, reduce the area, (or pixels) of the respectiveimages under consideration and, thereby, reduce processing time and/orcomputational resources. These steps can be performed by selecting therelevant subset of the pixel array of each image.

In steps 108 and 110, the method normalizes the (windowed) images. Theseoptional steps, which compensate for overall differences in imageintensity, can be performed by any technique known in the art.Preferably, however, normalization is global, using a map derived fromthe global statistics of the (windowed) images. The map is defined tomatch the extrema (or tails) of the statistical distributions of bothimages.

In step 112, the method generates a difference image, Image 3, bysubtracting Image 2 from Image 1. This subtraction is performed in theconventional manner known in the art. Objects in Image 3, i.e., the“difference” image, can be isolated by standard techniques such asconnectivity analysis, edge detection and/or tracking, and bythresholding. The latter technique is preferred, as discussed below.

In step 114, the method maps Image 3 to remove any negative differencevalues (i.e., negative pixel values) resulting from the subtraction. Italso can be used to normalize (or rescale) the difference image tofacilitate later stages of processing. This step, which can be performedin a conventional manner known in the art, is optional.

In step 116, the method performs morphology on the difference image.Morphology, which is well known in the art, is a technique foreliminating or accentuating data in the difference image, e.g., byfiltering out of variations due to video noise or small defects. Thiscan be performed, for example, in a manner disclosed by Jain, supra, atChapter 9.9, the teachings of which are incoporated herein by reference.

In step 118, the method thresholds, or binarizes, the image todistinguish or isolate objects of interest, such as adhesive patches onthe die surface or package leads. Thresholding can be performed in theconventional manner known in the art. Thus, for example, a singlethreshold intensity value can be determined from a histogram of Image 3.Preferably, however, the threshold intensity value is predetermined,i.e., based on empirical analysis of prior images.

In certain applications, use of a high global threshold intensity valuewill result in portions of the object of interest being interpreted asbackground and, therefore, will result in poor segmentation. Likewise,use of a low global threshold intensity value will result in backgroundbeing interpreted as objects of interest. To overcome this, the methodincludes an optional step of thresholding using a threshold imagegenerated by mapping Image 2; see step 120. That threshold image is madeup of pixels representing local threshold values.

In instances where a threshold image is used (e.g., in the bottle innerside wall inspection and the photofilm envelope inspection describedbelow), binarization step 118 involves subtracting the threshold imagefrom image 3, then, mapping positive differences to 1 (indicatingobject) and negative differences to zero (indicating background).

Following binarization, the method of step 122 conducts connectivityanalysis to determine the properties of any objects in the binarizedimage. Those properties, which include size, position, orientation, andprincipal moments, can be used to determine whether the object is indeeda defect requiring rejection of the semiconductor die.

Described above are embodiments of the invention employing direct andgazing light sources to segment images of a semiconductor die toidentify defects thereon. Those skilled in the art will, of course,appreciate that such lighting arrangements and methodologies can beapplied in segmenting and identifying a wide range of objects ofinterest.

The use of additional lighting arrangements permits segmentation andobject identification in still further applications. For example, FIG.2B illustrates an arrangement employing front and back lighting toinspect the inner side wall of a bottle 30. In this regard, the prioremploys a camera “looking downward” from the top of the bottle toinspect the inner side wall. This represents an attempt to inspectbehind the bottle label 31, which typically fully circumscribessurrounds the bottle. However, use of the downward-looking camera—and,significantly, its wide angle lens—results in a large amount ofgeometric distortion.

As shown in FIG. 2B, the illustrated arrangement uses a side-viewingcamera with intense back lighting to “see through” the label and,thereby, permit detection of unwanted objects (which tend to be opaque)on the inner side wall. In this arrangement, a front lit image of thebottle shows its front label and represents the effective “background.”By subtracting that front lit image from the back-lit image, any objectson the side wall can be readily discerned. Those skilled in the artwill, of course, appreciate that it is generally not necessary tosubtract an image of the back label itself, since the glass and bottlehollow tend to diffuse (and thereby remove) any features it mightpresent in the back-lit image.

In the drawing, there are shown back lighting illumination source 32 andfront lighting illumination source 34. The lighting source 32 is of thetype described above in connection with source 22. The lighting source34 is of the type described above in connection with source 24. Thelight 32 is selected to provide sufficient intensity to permitback-lighting of the entire inner side wall of the bottle, includingthat portion beneath the label 31. The front light 34 is selected andpositioned to provide sufficient intensity to illuminate label 34.Camera 38 is of the conventional type known in the art.

The camera 38 and lighting sources 32, 34 are beneficially employed inaccord with the invention to generate two images of the bottle that canbe subtracted from one another to reveal any defects (e.g., cigarettebutts, spiders, bugs, etc.) behind the label 31. To this end, a methodas illustrated in FIG. 4 is used to acquire a first image (Image 1) ofthe bottle as illuminated by the front light 34; c.f., step 100. Image 1shows the “background” alone, i.e., the print on the front label. Themethod is likewise used to acquire a second image (Image 2) of thebottle as illuminated by back light 32; c.f., step 102. Image 2 showsthe background and object, i.e., the print on the front label as well asany defect on in inner side wall. Because of the dispersive effect ofthe glass and bottle hollow, print on the back label does not appear inImage 2.

FIG. 3D depicts an image of the type resulting from back lighting bottle30 with source 32. FIG. 3E depicts the image resulting from frontlighting the bottle 30 with source 34. FIG. 3F depicts a differenceimage of the type produced by subtracting the image of FIG. 3E from theimage of FIG. 3D.

As noted, the methodology of FIG. 4 can be applied to segment andidentify defects in images of the types depicted in FIGS. 3D and 3E.Depending on the nature of the label 31, it can be typically necessaryto utilize an image map of the type generated in step 120, as opposed toa single threshold value. This prevents defects from being obscured (orfalsely indicated) as a result of labelling.

The front/back lighting arrangement of FIG. 2B can be used inapplications other than bottle inner side wall inspection. For example,that lighting arrangement and the foregoing methodology can be used toidentify film cartridges in sealed envelopes. The backlighting revealsany film cartridge in the envelope and the printing on the front of theenvelope, while the front lighting reveals only the print on the frontof the envelope. As above, the printing on the back of the envelope isdiffused and, hence, does not appear in the backlit image. A furtherappreciation of this application of the methodology may be attained byreference to the Attachment filed herewith.

In further embodiments, the invention contemplates an image capturearrangement as shown in FIG. 2C. Here, rather than employing twolighting sources, a system according to the invention captures lightreflected from the element 40 under inspection in two differentwavelengths. For this purpose, the object is illuminated by a singlelight source 42, which can be, for example, a white light. Reflectionsfrom the object captured by camera 26 can be filtered to capture thediffering wavelengths. Such filtering can be provided, e.g., by filters48, 50, which are selected such that objects on the surface of element40 appear differently (if at all) with respect to the background whenthe filtered light is captured by the camera 46.

In addition to capturing light of differing wavelengths, filters 48 and50 can capture light of differing orientations. To this end, they can bepolarizing lens of differing orientation for capturing light from source42 (which may also be polarized) that is reflected off element 40.

Described above are machine vision methods meeting the objects setforth. These methods provide improved machine vision image segmentationand object identification overcoming the deficiencies of the prior artsegmentation techniques, such as GTC. For example, apart from instanceswhere an illuminated object is moved between image captures, the methoddoes not require registration of images prior to subtraction. Nor themethod require training. Still further, the method is applicable to thewide range of repeatable and nonrepeatable images.

It will be appreciated that the embodiments described above areillustrative only and that additional embodiments within the ken ofthose of ordinary skill in the art fall within the scope of theinvention. Thus, for example, it will be appreciated that the lightingarrangements illustrated in FIGS. 2A-2C are merely by way of example,and that other lighting arrangements which result in difference imageswith greater object/background contrast may also be employed. Moreover,as noted above, although the discussion herein primarily refers tosubtraction of Image 2 from Image 1, those skilled in the art willlikewise appreciate that Image 1 can, alternatively, be subtracted fromImage 2 with like success (albeit with a reversal of “polarity” in theresulting image).

In view of the foregoing, what I claim is:
 1. A machine vision methodfor inspecting an object, comprising the steps of: illuminating theobject with an illumination source selected from a group of illuminationsources including (i) a first source that illuminates the object along adirection of a first axis, and (ii) a second source that illuminates theobject from an angle other than along the direction of the first axis,and generating a first image of the object with an image capture devicewhile the object is so illuminated, the image capture device beingoriented for capturing the first image in the direction of the firstaxis; illuminating the object with another illumination source selectedfrom the aforesaid group, and generating a second image of the objectwith an image capture device while it is so illuminated, the imagecapture device being oriented for capturing the second image in thedirection of the first axis; and subtracting the second image from thefirst image to form a third image that increases a contrast between theobject and a background thereof.
 2. A method according to claim 1,wherein the step of generating the second image includes the step ofgenerating that image such that subtraction of the second image from thefirst image increases a contrast between the object and the background.3. A method according to claim 1, comprising the step of isolating theobject within the third image.
 4. A method according to claim 3, wherethe isolating step comprises the step of performing connectivityanalysis on the third image to distinguish the object from thebackground.
 5. A method according to claim 3, wherein the isolating stepcomprises the step of detecting and tracking edges in the third image toisolate the object.
 6. A method according to claim 3, wherein theisolating step comprises the step of thresholding the third image todistinguish at least one of the object and its edges from thebackground.
 7. A method according to claim 6, wherein the thresholdingstep comprises the step of determining an intensity threshold value thatdistinguishes at least one of the object and its edges from thebackground.
 8. A method according to claim 6, comprising the steps ofgenerating a threshold image from at least one of the first and secondimages, the threshold image having pixels representing local thresholdintensity values; and using the threshold image to distinguish, in thethird image, at least one of the object and its edges from thebackground.
 9. A method according to claim 8, wherein the step ofgenerating the threshold image includes the step of mapping imageintensity values in the second image to generate the threshold image.10. A method according to claim 8, wherein the step of using thethreshold image includes the step of subtracting the threshold imagefrom the third image.
 11. A method according to claim 1, comprising thestep of normalizing at least one of the first and second images beforethe subtracting step.
 12. A method according to 11, wherein thenormalizing step includes the steps of determining distributions ofintensity values of each of the first and second images; generating amapping function for matching extrema of those distributions; andtransforming the intensity values of at least one of the first andsecond images with that mapping function.
 13. A method according toclaim 1, including the step of generating the first and second imageswith light of different respective polarizations.
 14. A method accordingto claim 1, including the step of generating the first and second imagesby illuminating the semiconductor device with emissions in differentrespective wavelengths.
 15. A method according to claim 1, including thefurther step of registering the first and second images with one anotherbefore the subtracting step.
 16. A machine vision method for inspectingan object, comprising the steps of: illuminating the object with anillumination source selected from a group of illumination sourcesincluding (i) a first source that illuminates the object along adirection of a first axis, and (ii) a second source that illuminates theobject from an angle other than along the direction of the first axis;and generating a first image of the object with an image capture devicewhile the object is so illuminated, the image capture device beingoriented for capturing the first image in the direction of the firstaxis; illuminating the object with another illumination source selectedfrom the aforesaid group, and generating a second image of the objectwith an image capture device while it is so illuminated, the imagecapture device being oriented for capturing the second image in thedirection of the first axis; isolating the object from the background inthe third image by any of segmentation, edge detection and tracking,connectivity analysis, and thresholding.
 17. A machine vision method forinspecting an object, comprising the steps of: lighting the object witha source selected from a group of sources including (i) a first sourcethat lights the object along a direction of a first axis, and (ii) asecond source that lights the object from an angle other than along thedirection of the first axis, and generating a first image of the objectwith an image capture device while the object is so lighted, the imagecapture device being oriented for capturing the first image in thedirection of the first axis; lighting the object with another sourceselected from the aforesaid group, and generating a second image of theobject with an image capture device while it is so lighted, the imagecapture device being oriented for capturing the second image in thedirection of the first axis; and subtracting the second image from thefirst image to form a third image that increases a contrast between theobject and a background thereof.
 18. A method according to claim 17,wherein the step of generating the second image includes the step ofgenerating that image such that subtraction of the second image from thefirst image increases a contrast between the object and the background.19. A method according to claim 17, comprising the step of isolating theobject within the third image.
 20. A method according to claim 19, wherethe isolating step comprises the step of performing connectivityanalysis on the third image to distinguish the object from thebackground.
 21. A method according to claim 19, wherein the isolatingstep comprises the step of detecting and tracking edges in the thirdimage to isolate the object.
 22. A method according to claim 19, whereinthe isolating step comprises the step of thresholding the third image todistinguish at least one of the object and its edges from thebackground.
 23. A method according to claim 22, wherein the thresholdingstep comprises the step of determining an intensity threshold value thatdistinguishes at least one of the object and its edges from thebackground.
 24. A method according to claim 22, comprising the steps ofgenerating a threshold image from at least one of the first and secondimages, the threshold image having pixels representing local thresholdintensity values; and using the threshold image to distinguish, in thethird image, at least one of the object and its edges from thebackground.
 25. A method according to claim 24, wherein the step ofgenerating the threshold image includes the step of mapping imageintensity values in the second image to generate the threshold image.26. A method according to claim 24, wherein the step of using thethreshold image includes the step of subtracting the threshold imagefrom the third image.
 27. A method according to claim 17, comprising thestep of normalizing at least one of the first and second images beforethe subtracting step.
 28. A method according to 27, wherein thenormalizing step includes the steps of determining distributions ofintensity values of each of the first and second images; generating amapping function for matching extrema of those distributions; andtransforming the intensity values of at least one of the first andsecond images with that mapping function.
 29. A method according toclaim 17, including the step of generating the first and second imageswith light of different respective polarizations.
 30. A method accordingto claim 17, including the step of generating the first and secondimages by lighting the semiconductor device with emissions in differentrespective wavelengths.
 31. A method according to claim 17, includingthe further step of registering the first and second images with oneanother before the subtracting step.
 32. A machine vision method forinspecting an object, comprising the steps of: lighting the object witha source selected from a group of sources including (i) a first sourcethat lights the object along a direction of a first axis, and (ii) asecond source that lights the object from an angle other than along thedirection of the first axis, and generating a first image of the objectwith an inmage capture device while the object is so lighted, the imagecapture device being oriented for capturing the first image in thedirection of the first axis; lighting the object with another sourceselected from the aforesaid group, and generating a second image of theobject with an image capture device while it is so lighted, the imagecapture device being oriented for capturing the second image in thedirection of the subtracting the second image from the first image toform a third image that enhances a contrast between the object and abackground thereof; and isolating the object from the background in thethird image by any of segmentation, edge detection and tracking,connectivity analysis, and thresholding.